package com.example.lirisheng.springbootfinalexperiment.util;

import com.example.lirisheng.springbootfinalexperiment.entity.PersonInformation;
import lombok.Data;

@Data
public class QRJsonUtil {
    private Long id;
    private String name;
    private String identity;
    private String house_id;
    private Long entity_times=0L;
    private Long warn=0L;
    private  String openId;

    public static QRJsonUtil creAndInitQR(String openId,PersonInformation personInformation){
        QRJsonUtil qrJsonUtil = new QRJsonUtil();
        qrJsonUtil.setName(personInformation.getName());
        qrJsonUtil.setHouse_id(personInformation.getHouseId());
        qrJsonUtil.setIdentity(personInformation.getIdentity());
        qrJsonUtil.setEntity_times(personInformation.getEntityTimes());
        qrJsonUtil.setWarn(personInformation.getWarn());
        qrJsonUtil.setId(personInformation.getId());
        qrJsonUtil.setOpenId(openId);
        return  qrJsonUtil;
    }
}
